﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Psl.Applications;
using Psl.Chat;
using Stl.Tme.Components.DesignOutline;

namespace ChatDesign
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            ExceptionBoxAuto.Enable();

            // création de la fenêtre principale + usage du protocole de coopération
            StandardMainForm form = new StandardMainForm("Chat Design", "Bo CAI, Fabrice Reynaud", null);
            ChatRegistry.ChatState.Usage = ChatUsage.Client;

            // création de deux utilisateurs
            SplitContainer split = form.CreateSplit(new DesignCluster(), new DesignCluster());
            Registry.MainPages.ClientAdd(split, "ChatDesign", null, true);

            // chargement des plugins
            PluginManager.LoadPlugins(false, "*ServicesPlugin.dll");
            PluginManager.LoadPlugins(false, "*ModelPlugin.dll");
            PluginManager.LoadPlugins(false, "*RemotingPlugin.dll");

            /*
            // câblage du protocole de coopération en usage local
            ChatRegistry.ChatState.Model = ChatRegistry.ChatState.ModelInternal;
            ChatRegistry.ChatState.FireChatOpened();
            */

            // exécution de l'application
            Application.Run(form);
        }
    }
}
